<template>
  <div>
    <ly-tab v-model="selectedId" :items="items" :options="options" @change="handleChange" />
  </div>
</template>

<script>
export default {
  name: 'topTab',
    data(){
        return {
            selectedId:0, //选中id
            items:[
                
                {label:'外卖券'},
                {label:'出行券'},
                {label:'网购券'},
                {label:'快餐券'},
                {label:'娱乐券'}
                
            ],
            options:{
                activeColor:'#d70004'
            },

            router:[
                '/waimai',
                '/chuxing',
                '/wanggou',
                '/kuaican',
                '/yule'
            ]
        }
    },
    methods:{
        handleChange(item,index){
            this.$router.replace(this.router[index])
        }
    }
}
</script>